home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_10
/
9n10032b
< prev
next >
Wrap
Text File
|
1991-08-12
|
528b
|
25 lines
#include <ctype.h>
int cistrcmp(const char *ps1, const char *ps2)
{
char c1, c2;
while (1) {
c1 = toupper(*ps1);
c2 = toupper(*ps2);
if (c1 < c2)
return -1;
else if (c1 > c2)
return 1;
else if (c1 == '\0')
return 0;
else {
++ps1;
++ps2;
}
}
}